<template>
	<SubjectSearch v-model:title="inputValue" @search="search"/>
	<div>
		<van-dropdown-menu>
		  <van-dropdown-item v-model="value1" :options="option1" />
		  <van-dropdown-item v-model="value2" :options="option2" />
		  <van-dropdown-item v-model="value2" :options="option2" />
		</van-dropdown-menu>
	</div>
</template>
<script lang="ts" setup>
import { ref,reactive,defineExpose } from 'vue';
import Kf from "../../kf/Kf.vue"
import SubjectSearch from "../subject/SubjectSearch.vue";
const emit = defineEmits(['search']);
const props = defineProps<{
		value: {
			subjectID:number;
			key:string;
			year:string;
			type:string;
			date:string;
		};
}>();
let inputValue=reactive(props.value);

defineExpose({
    inputValue,// 暴露方法
});

let search=()=>{
	emit("search");
}

//其他
const value1 = ref(0);
const option1 = [
	{ text: '入学年份', value: 0 },
	{ text: '新款商品', value: 1 },
	{ text: '活动商品', value: 2 },
];
	
const value2 = ref('a');
const option2 = [
	{ text: '考试类型', value: 'a' },
	{ text: '好评排序', value: 'b' },
	{ text: '销量排序', value: 'c' },
];
</script>

<style>
</style>